<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			
		</style>
	</head>
	<body>
		用户名：<input name="uname" id="" value="" placeholder="请输入用户名" style="border: none;outline: none;text-underline: initial;"/>
		
		密码：<input type="password" id="" name="pw" placeholder="请输入密码" style="border: none;outline: none;"/>
		
		确认密码：<input type="password" id="" name="pw" placeholder="请输入密码" style="border: none;outline: none;"/>
		
		性别：<input type="radio" name="sex" value="female"/>男
		<input type="radio" name="sex" value="male"/>女
		<input type="radio" name="sex" value="bm"/>保密
		
		爱好：<input type="checkbox" name="soprt" value="lanqiu"/>篮球
		<input type="checkbox" name="soprt" value="paobu"/>跑步
		<input type="checkbox" name="soprt" value="youyong"/>游泳
		
		专业：<select name="">
			<option value="">软件技术</option>
			<option value="">计算机</option>
		</select>
		
		个人简介：<textarea name="" rows="10" cols=""></textarea>
		
		头像：<input type="file" />
		
		<input type="button" id="btn" value="按钮" />
		
		您选择的性别是：<span id="sexHtml"></span>
	</body>
	<script type="text/javascript">
		window.onload = function(){
			let map = new Map()
			map.set('female','男')
			map.set('male','女')
			map.set('bm','保密')
			
			
			document.getElementById('btn').onclick = function(){
				let objsex = document.getElementsByName('sex')
				for(var i=0;i<objsex.length;i++){
					if(objsex[i].checked === true){
						console.dir(map.get(objsex[i].value))
						document.getElementById('sexHtml').innerHTML = map.get(objsex[i].value)
					}
				}
				
//				alert(document.getElementsByName('uname')[0].value)
			}
		}
	</script>
</html>
